package com.stone.service.impl;

import com.stone.rpc.bean.UserDTO;
import com.stone.rpc.service.UserService;
import com.stone.service.UserRpcService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Service
public class UserRPCServiceImpl implements UserRpcService {

    @DubboReference(version = "${dubbo.consumer.UserRpcService.version}")
    private UserService userService;

    @Override
    public UserDTO getUser(Integer id) {

        return userService.getUser(id);
    }
}
